10 'IBM AUTOMATIC PROOFREADER FROM: COMPUTE!'S PC & PCjr MAGAZINE VOL 1, No 7 SEPTEMBER 1984
12 'This program is designed to aid in entering programs taken from the magazine
14 'When you run the program, the screen will turn white and typing will be in reverse video. you may begin entering the program immeditaely.
16 'Once you have entered a line, there will be a short delay and then two letters will appear to the left of the line number. This is the CHECKSUM and should correspond to that of the magazine.
18 'If they agree you have copied the line correctly; if not, recheck the line just entered very carefully for you have made a typing error!
20 'Error may consist of extra spaces, commas instead of periods or semicolons, etc. PROOFREADER is very exact and will spot ANY error !!!
22 'PROOFREADER also discrimiates between upper and lower case letters because they ARE different in it's eyes.
24 'Do not abreviate the REM as ' or PRINT as ? because these too are different as PROOFREADER totals the binary equivalent of each keystroke.
26 '
28 '
30 'PROOFREADER COMMANDS:
32 ' -are the same as BASIC with a few exceptions
34 ' -the basic prompt is OK, PROOFREADER'S prompt is "PROOFREADER READY"
36 ' -LIST command is the same as Basic
38 ' -CHECK command is the same as list except it also displays the CHECKSUM
40 ' -LLIST command is the same as Basic
42 ' -NEW command clears the program being typed out of PROOFREADER but does not clear PROOFREADER out of memory (a very nice feature !)
44 ' -FILES command shows a listing of programs on drive A only
46 ' -BASIC command exits the PROOFREADER and returns the Basic prompt of OK
48 ' -CONT command returns you into PROOFREADER if you have accidently given the BASIC command. The screen will no longer be white but PROOFREADER and the program you were entering will still be intact !
50 ' -SAVE command is the same as in Basic and as in Basic; you are encourag ed to use it periodically throughout the entering process.
52 ' -Unlike Basic, PROOFREADER saves the program in ASCII format.
54 ' -LOAD command is also similar to that of Basic, however the program to be loaded MUST be in ASCII format for PROOFREADER to successfully load it.
56 '
58 '
60 'IF YOU FIND YOU HAVE MADE AN ERROR YOU MAY CORRECT IT IMMEDIATELY AND THEN CONTINUE ENTERING YOUR PROGRAM. LOTS OF LUCK AND GOOD TYPING !
70 '
80 '
90 '
100 DIM L$(500),LNUM(500):COLOR 0,7,7:KEY OFF:CLS:MAX=0:LNUM(0)=65536
170 IF LEFT$(L$,1)=" " THEN L$=MID$(L$,2):GOTO 170
180 IF VAL(LEFT$(L$,2))=0 AND MID$(L$,3,1)=" " THEN L$=MID$(L$,4)
190 LNUM=VAL(L$):TEXT$=MID$(L$,LEN(STR$(LNUM))+1)
200 IF ASC(L$)>57 THEN 260 'no line number, therefore command
210 IF TEXT$="" THEN GOSUB 540:IF LNUM=LNUM(P) THEN GOSUB 560:GOTO 150 ELSE 150 'delete line
220 CKSUM=0:FOR I=1 TO LEN(L$):CKSUM=(CKSUM+ASC(MID$(L$,I))*I) AND 255:NEXT:LOCATE Y,1:PRINT CHR$(65+CKSUM/16)+CHR$(65+(CKSUM AND 15))+" "+L$
230 GOSUB 540:IF LNUM(P)=LNUM THEN L$(P)=TEXT$:GOTO 150 'replace line
240 GOSUB 580:GOTO 150 'insert the line
250 'command processor. step 1: convert to upper case
260 TEXT$="":FOR I=1 TO LEN(L$):A=ASC(MID$(L$,I)):TEXT$=TEXT$+CHR$(A+32*(A>96 AND A<123)):NEXT
270 DELIMITER=INSTR(TEXT$," "):COMMAND$=TEXT$:ARG$="":IF DELIMITER THEN COMMAND$=LEFT$(TEXT$,DELIMITER-1):ARG$=MID$(TEXT$,DELIMITER+1):GOTO 280 'separate command from an argument if delimiter is a space
275 DELIMITER=INSTR(TEXT$,CHR$(34)):COMMAND$=TEXT$:ARG$="":IF DELIMITER THEN COMMAND$=LEFT$(TEXT$,DELIMITER-1):ARG$=MID$(TEXT$,DELIMITER) 'separate command from an argument if delimiter is a quote mark
280 IF COMMAND$<>"LIST" THEN 410
290 OPEN "scrn:" FOR OUTPUT AS #1
300 IF ARG$="" THEN FIRST=0:P=MAX-1:GOTO 340
310 DELIMITER=INSTR(ARG$,"-"):IF DELIMITER=0 THEN LNUM=VAL(ARG$):GOSUB 540:FIRST=P:GOTO 340